﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Practices.Composite.Events;

namespace EQual.MainModule.Documents.Views
{
    /// <summary>
    /// Interaction logic for DocumentsListViewControl.xaml
    /// </summary>
    public partial class DocumentsListViewControl : UserControl,IDocumentGridView 
    {
        public DocumentsListViewControl()
        {
            InitializeComponent();
        }


        public event EventHandler<DataEventArgs<DataAccesLayer.Document>> ItemSelected;

        public event EventHandler<DataEventArgs<DataAccesLayer.Document>> ItemDeleted;

        public event EventHandler<DataEventArgs<DataAccesLayer.Document>> ItemAdded;

        public object Model
        {
            get
            {
                return this.DataContext as EQual.MainModule.Documents.Models.IDocumentsPresentationModel;
            }
            set
            {
                this.DataContext = value;
            }
        }

        #region IDocumentGridView Members

        public bool IsEditable
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        #endregion

        #region IDocumentGridView Members


        public event EventHandler<DataEventArgs<DataAccesLayer.Document>> ItemSaved;

        #endregion
    }
}
